part of 'card_info.dart';

class UnspecifiedLexicalItemObscureCardInfo extends Equatable implements CardInfo {
  UnspecifiedLexicalItemObscureCardInfo({
    String? cardId,
    required this.lexicalItem,
    required this.safeToPronounce,
    required this.finishEvent,
  }) : cardId = cardId ?? UuidGenerator().generateUuid();

  @override
  final String cardId;

  final LexicalItem lexicalItem;
  final bool safeToPronounce;
  final UnspecifiedLexicalItemObscureCardFinishEvent finishEvent;

  @override
  List<Object?> get props {
    return [
      cardId,
      lexicalItem,
      safeToPronounce,
      finishEvent,
    ];
  }

  UnspecifiedLexicalItemObscureCardInfo copyWith({
    String Function()? cardId,
    LexicalItem Function()? lexicalItem,
    bool Function()? safeToPronounce,
    UnspecifiedLexicalItemObscureCardFinishEvent Function()? finishEvent,
  }) {
    return UnspecifiedLexicalItemObscureCardInfo(
      cardId: cardId == null ? this.cardId : cardId(),
      lexicalItem: lexicalItem == null ? this.lexicalItem : lexicalItem(),
      safeToPronounce: safeToPronounce == null ? this.safeToPronounce : safeToPronounce(),
      finishEvent: finishEvent == null ? this.finishEvent : finishEvent(),
    );
  }
}

enum UnspecifiedLexicalItemObscureCardFinishEvent {
  none,
  exposed,
  vanished;

  bool get isNone {
    return this == UnspecifiedLexicalItemObscureCardFinishEvent.none;
  }

  bool get isExposed {
    return this == UnspecifiedLexicalItemObscureCardFinishEvent.exposed;
  }

  bool get isVanished {
    return this == UnspecifiedLexicalItemObscureCardFinishEvent.vanished;
  }
}
